<div class="_mainbox">
	{{#if bus_info.config.home_imgs.length}}
	<picwall array-data-key="bus_info.config.home_imgs"></picwall>
	{{#else}}
	<div class="picwall">
        <div class="carosule">
            <div class="pic-show">
                <div class="pic">
                    <img src="images/theme1.jpg"/>
                </div>
            </div>
        </div>
    </div>
	{{/if}}
	<div class="maininfo">
		<div class="logo">
			{{#if bus_info.info.logo_url}}
			<img src="{{bus_info.info.logo_url}}?imageView/1/h/40/w/40"/>
			{{/if}}
			<div class="info">
				<span class="name">{{bus_info.info.title}}</span>
				<div>{{bus_info.info.address}}</div>
			</div>
		</div>
		
	</div>
</div>

<div class="nav">
	<div class="navbar">
		<a href="m.tags.html"><div class="nav-button">商品分类</div></a>
		<a href="m.all-goods.html?id=2"><div class="nav-button">热销商品</div></a>
		<a href="m.store-int.html"><div class="nav-button">店铺介绍</div></a>
		<a href="m.help.html"><div class="nav-button">省钱攻略</div></a>
	</div>
</div>

<div class="main-goods">
    {{#each goods_list}}
        <main-goods-mobile href="/m.goods-details.html?id={{_id}}" name="{{goods_name}}" src="{{preview_img_url||'/images/imgerror.jpg'}}" intro="{{intro}}" price="{{price}}/{{unit}}"></main-goods-mobile>
    {{/each}}
</div>

<xmp type="tag" name="picwall">
    <div class="picwall">
        <div class="carosule">
            <div class="pic-show">
                {{#each ${array-data-key} }}
                <div style="z-index:{{$Parent.length-$Index}}" class="pic {{$Top.$Pindex==$Index&&'focus'}}">
                    <a target="_blank" bind-href="{{href||'javascript:void 0'}}">
                        <img bind-src="{{img_url}}?imageView/2/h/250" bind-title="{{title}}" />
                    </a>
                </div>
                {{/each}}
            </div>
        </div>
    </div>
    <script type="text/vm">
		function(vm) {
		    var picwall = vm.queryElement({
		        className: 'picwall'
		    })[0];
		    require(["jQuery"], function($) {
		        var w = $(picwall).width();
		        var current_pic;
		        var _i=1;
	            var pics = $(".pic");
		        if ($(pics).length>1) {
			        setInterval(function _a() {
			            current_pic || (current_pic = pics.first());
			            var animating_pic = current_pic.fadeOut(800);
			            current_pic = current_pic.next();
			            if (current_pic.length == 0) {
			                current_pic = null;
			                pics.not(animating_pic).fadeIn(800);
			                setTimeout(function(){
			                    animating_pic.fadeIn(800);
			                },1200);
			            }
			            _i +=1;
			            return _a;
			        }(), 5000);
		        };
		    });
		}
    </script>
</xmp>

